package com.orangelife.mobile.myhouse.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.curry.orangelife.mobile.R;
import com.common.jump.HouseJumper;
import com.datatrack.DataTrack;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class TenantCertOkFragment extends Fragment {
    @Bind(R.id.btnLeft)
    Button btnLeft;
    @Bind(R.id.btnRight)
    Button btnRight;
    final  String MODULE_NAME="identityAuthenticationSuccess";
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_tenant_cert_ok, container, false);
        ButterKnife.bind(this, view);
        initView();
        return view;
    }

    private void initView() {
        btnLeft.setText("继续申请");
        btnRight.setText("完成");
    }

    @OnClick({R.id.btnLeft, R.id.btnRight})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btnLeft:
                HouseJumper.jumpToCert(getActivity(), null);
                break;
            case R.id.btnRight:
                DataTrack.clickTrack(DataTrack.APP_NAME,MODULE_NAME,"complete");
                break;
        }
        getActivity().finish();
    }
}
